﻿//using DevExpress.Office.Drawing;
//using Marmat.Extensions;
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;

//namespace Marmat.Template.WinForm
//{
//    /// <summary>
//    /// 高级关联组件提供的工厂服务。
//    /// </summary>
//    internal sealed class AdvRelationFactoryProvider
//    {

//        /// <summary>
//        /// 获取指定模块的关联提供服务。
//        /// </summary>
//        /// <param name="model"></param>
//        /// <returns></returns>
//        internal static IAdvRelationProvider GetRelationProvider(string model)
//        {
//            var providers = ServiceCollectionExtension.GetServices<IAdvRelationProvider>();
//            return providers.LastOrDefault(provider => string.Equals(provider.Name, model));
//        }

//        internal static IAdvRelationProvider<T> GetRelationProvider<T>(string model)
//        {
//            var providers = ServiceCollectionExtension.GetServices<IAdvRelationProvider<T>>();
//            return providers.LastOrDefault(provider => string.Equals(provider.Name, model));
//        }
//    }
//}
